<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>我的订单</title>

	<%-- 静态包含 base标签、css样式、jQuery文件 --%>
	<%@ include file="/pages/common/head.jsp"%>

	<style type="text/css">
		h1 {
			text-align: center;
			margin-top: 200px;
		}
	</style>
	
</head>
<body>
	
	<div id="header">
			<img class="logo_img" alt="" src="static/img/logo.jpg" >
			<span class="wel_word">我的订单</span>

			<div>
			   	<span>欢迎<span class="um_span">${sessionScope.user.name}</span>光临</span>
			    <a href="client/orderServlet?action=receiveAllOrders">一键签收</a>
			    <a href="userServlet?action=logout">退出登录</a>&nbsp;&nbsp;
			    <a href="index.jsp">返回</a>
			</div>

	</div>
	
	<div id="main">
		<table>
			<tr>
				<td>日期</td>
				<td>金额</td>
				<td>状态</td>
				<td>详情</td>
				<td>操作</td>
			</tr>
			<c:if test="${empty sessionScope.ordersViewList}">
				<tr>
					<td colspan="5"><a href="index.jsp">您没有未完成的订单哦，快去选购商品吧！</a></td>
				</tr>
			</c:if>
			<c:if test="${not empty sessionScope.ordersViewList}">
				<c:forEach items="${sessionScope.ordersViewList}" var="ordersView">
					<tr>
						<td>${ordersView.crtTime}</td>
						<td>${ordersView.totalPrice}</td>
						<td>${ordersView.statusContent}</td>
						<td><a href="client/orderServlet?action=showOrderDetail&orderId=${ordersView.id}">查看详情</a></td>
						<td>
							<c:if test="${ordersView.status == 1}">
								<a href="client/orderServlet?action=receiveOrder&orderId=${ordersView.id}">签收</a>
							</c:if>
						</td>
					</tr>
				</c:forEach>
			</c:if>
		</table>
	
	</div>

	<%--静态包含页脚内容--%>
	<%@include file="/pages/common/footer.jsp"%>

</body>
</html>